//package com.networkapp;
//
//import android.content.Context;
//import android.util.Log;
//import android.widget.Toast;
//
//import com.networklib.Excuter;
//
//import java.util.HashMap;
//import java.util.Map;
//
//import timber.log.Timber;
//
//public class NetRequest {
//    public static final String URL = "http://192.168.2.121:8080/eflyCloud/gcs/loginUser";
//    private static final String TAG = "NetRequest";
//
//
//    public static <T> void postRequest(final Context context, String url, final RequestCallback<T> requestCallback, UploadParam... uploadParams) {
//        Map<String, Object> params = new HashMap<>();
//        for (UploadParam uploadParam : uploadParams) {
//            params.put(uploadParam.getParamsKey().getKey(), uploadParam.getFormatType().format(uploadParam.getParamValue()));
//        }
//        Excuter.getInstance().postRequest(context, url, new Excuter.ExcuterCallback<String>() {
//            @Override
//            public void onCall(Excuter.TaskResponse<String> taskResponse) {
//                Toast.makeText(context, taskResponse.getResult(), Toast.LENGTH_SHORT).show();
//                Log.d(TAG, "onCall: " + taskResponse.getResult());
//            }
//        }, params);
//    }
//
//    public interface RequestCallback<T> {
//        void onSuccess();
//
//        void onFailed();
//    }
//
//}
